You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accept empty aggregate initializers when emulating clang versions before 17 [GH #238] - #235
I'm not able to open an issue, as that is currently restricted to contributors, of which I am not one. Hence, I'm just opening a PR with a fix, which I understand is not ideal.
We noticed a regression where empty initializers for aggregates are no longer accepted when emulating clang versions before clang 17. For example, the following fails with EDG 7.0:
structA {
int i;
};
structA a = {};
This seems to be due to the changes made as part of EDGcpfe/29042. This PR restores the behavior for empty aggregate initializers. Note that I picked clang 2.9 as the lower bound, as that was the minimum version I was reasonably able to test against.
Note that I picked clang 2.9 as the lower bound, as that was the minimum version I was reasonably able to test against.
As a wrote "Note that I picked clang 2.9 as the lower bound, as that was the minimum version I was reasonably able to test against.", but let me do some further digging and get back to you.
Ah yes, sorry, I missed that.
Thanks for investigating... generally-speaking, I think it's acceptable to emulate for clangc_version_is(any_version) if it can be reproduced as far back as Clang 3.8.
Also, I've open issue #238 for this (to use [GH #238] as the Changes entry tag).
Thanks for investigating... generally-speaking, I think it's acceptable to emulate for clangc_version_is(any_version) if it can be reproduced as far back as Clang 3.8.
Thanks for this input. Based on this and creating the PR I think there are several areas where a bit more guidance as part of the documentation would be helpful:
What are the minimal versions of clang, gcc, and msvc that you aim to be able to emulate?
What is generally a good place to put new tests (both for new features and for regressions)?
What is a sensible subset of the tests one should run while developing (given that the complete test suite is very large)?
What to do with change note merge conflicts? Should I make sure the new change note ends up at the top?
jketema
changed the title
Accept empty aggregate initializers when emulating clang versions before 17 []
Accept empty aggregate initializers when emulating clang versions before 17 [GH #283]
Oct 8, 2026
jketema
changed the title
Accept empty aggregate initializers when emulating clang versions before 17 [GH #283]
Accept empty aggregate initializers when emulating clang versions before 17 [GH #238]
Oct 8, 2026
Thanks for investigating... generally-speaking, I think it's acceptable to emulate for clangc_version_is(any_version) if it can be reproduced as far back as Clang 3.8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not able to open an issue, as that is currently restricted to contributors, of which I am not one. Hence, I'm just opening a PR with a fix, which I understand is not ideal.
We noticed a regression where empty initializers for aggregates are no longer accepted when emulating clang versions before clang 17. For example, the following fails with EDG 7.0:
This seems to be due to the changes made as part of EDGcpfe/29042. This PR restores the behavior for empty aggregate initializers. Note that I picked clang 2.9 as the lower bound, as that was the minimum version I was reasonably able to test against.